package com.yuw.homework04;

public class SalesEmployee extends ColaEmployee {
    // 属性
    private double saleRate;
    private double getTotal;

    // 行为

    public SalesEmployee() {
    }

    public SalesEmployee(String employeeName, int employeebirthMonth, double saleRate, double getTotal) {
        super(employeeName, employeebirthMonth);
        this.saleRate = saleRate;
        this.getTotal = getTotal;
    }

    public double getSaleRate() {
        return saleRate;
    }

    public void setSaleRate(double saleRate) {
        this.saleRate = saleRate;
    }

    public double getGetTotal() {
        return getTotal;
    }

    public void setGetTotal(double getTotal) {
        this.getTotal = getTotal;
    }

    @Override
    public double getSalary(int month) {
        return super.getSalary(month) + this.getTotal * this.saleRate;
    }

    @Override
    public void pirntSalary(int currentMoth) {
        System.out.println(this.getEmployeeName() + "工资：" + getSalary(currentMoth));
    }
}
